﻿using System.ComponentModel;

namespace Zhp.Common.WebApp
{
    public class StatusCodeConst
    {
        /// <summary>
        /// AccessToken过期，需要刷新token
        /// </summary>
        public const int AuthAccessTokenStatusCode = 4000;
        public const string AuthAccessTokenMessage = "登录过期，请刷新Token！";

        /// <summary>
        /// RefreshToken，需要重新登录
        /// </summary>
        public const int AuthRefreshTokenStatusCode = 4001;
        public const string AuthRefreshTokenMessage = "登录过期，请重新登录！";

        /// <summary>
        /// 没权限
        /// </summary>
        public const int AuthForbiddenStatusCode = 4003;
        public const string AuthForbiddenMessage = "没权限！";
    }

    public enum TokenStatusEnum
    {
        [Description("登录过期，请刷新Token！")]
        AccessToken = 4000,
        [Description("登录过期，请重新登录！")]
        RefreshToken = 4001,
        [Description("没权限！")]
        Forbidden = 4003
    }
}
